package com.elastic.factory;

import com.elastic.factory.interfaces.Button;
import com.elastic.factory.interfaces.ComboBox;
import com.elastic.factory.interfaces.SkinFactory;
import com.elastic.factory.interfaces.TextField;

import java.util.Objects;

public class FactoryClient {

    public static void main(String[] args) throws Exception {
        SkinFactory factory = null;
        Integer code = 0;

        if (Objects.equals(code,1)){
            factory = new SpringSkinFactory();
        }else {
            factory = new SummerSkinFactory();
        }

        Button button = factory.createButton();

        ComboBox comboBox = factory.createComboBox();

        TextField textField = factory.createTextField();
        button.display();
        comboBox.display();
        textField.display();

    }

}
